package com.wxzz.elearing.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wxzz.elearing.user.dto.AdminLoginDto;
import com.wxzz.elearing.user.entity.AdminUser;
import org.apache.ibatis.annotations.Select;

import java.util.Optional;

/**
 * <p>
 * 系统用户 Mapper 接口
 * </p>
 *
 * @author
 * @since 2021-03-11
 */
public interface AdminUserMapper extends BaseMapper<AdminUser> {

    @Select("SELECT * FROM `admin_user` WHERE username = #{username} AND password = #{password} AND deleted = 0")
    Optional<AdminUser> selectAdminUser(AdminLoginDto adminLoginDto);

}
